import request from '@/utils/axiosUtils.js'

export const loginService = (data) => {  
     console.log('发送的请求是：',data)
    return request({
        url: '/login',
        method: 'post',
        data: data
    })
}


export const getPhoneCodeService = (data) => {  
    console.log('发送的手机号参数是请求是：',data.phone)
   return request({
       url: '/phonecaptcha',
       method: 'get',
       params:{
        phone:data.phone
       }
   })
}

export const RegisterService=(data) => {
/*    let objetc={
        user:{
            username:data.username,
            password:data.password,
            phone:data.phone
        },
        code:data.code
    }*/
    
    // console.log('发送的注册请求是：',objetc)
    return request({
        url:'/registerbyphone',
        method:'post',
        data:data
    })
}